<!--

     Licensed to the Apache Software Foundation (ASF) under one
     or more contributor license agreements.  See the NOTICE file
     distributed with this work for additional information
     regarding copyright ownership.  The ASF licenses this file
     to you under the Apache License, Version 2.0 (the
     "License"); you may not use this file except in compliance
     with the License.  You may obtain a copy of the License at

       http://www.apache.org/licenses/LICENSE-2.0

     Unless required by applicable law or agreed to in writing,
     software distributed under the License is distributed on an
     "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
     KIND, either express or implied.  See the License for the
     specific language governing permissions and limitations
     under the License.

-->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!-- **************************************************************** -->
<!-- *  PLEASE KEEP COMPLICATED EXPRESSIONS OUT OF THESE TEMPLATES, * -->
<!-- *  i.e. only iterate & print data where possible. Thanks, Jez. * -->
<!-- **************************************************************** -->

<html>
<head>
    <!-- Generated by groovydoc (2.4.5) on Mon Sep 12 08:35:17 CEST 2016 -->
    <title>DatagramSocket (Groovy Documentation)</title>
    <meta name="date" content="2016-09-12">
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <link href="../../../../../groovy.ico" type="image/x-icon" rel="shortcut icon">
    <link href="../../../../../groovy.ico" type="image/x-icon" rel="icon">
    <link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style">

<body class="center">
<script type="text/javascript"><!--
if (location.href.indexOf('is-external=true') == -1) {
    parent.document.title="DatagramSocket (Groovy Documentation)";
}
//-->
</script>
<noscript>
    <div>JavaScript is disabled on your browser.</div>
</noscript>
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="topNav"><a name="navbar_top">
    <!--   -->
</a><a href="#skip-navbar_top" title="Skip navigation links"></a><a name="navbar_top_firstrow">
    <!--   -->
</a>
    <ul class="navList" title="Navigation">
        <li><a href="../../../../../overview-summary.html">Overview</a></li>
        <li><a href="package-summary.html">Package</a></li>
        <li class="navBarCell1Rev">Class</li>
        <li><a href="../../../../../deprecated-list.html">Deprecated</a></li>
        <li><a href="../../../../../index-all.html">Index</a></li>
        <li><a href="../../../../../help-doc.html">Help</a></li>
    </ul>
</div>

<div class="subNav">
    <div>
        <ul class="navList">
            <li><a href="../../../../../index.html?io/vertx/groovy/core/datagram/DatagramSocket" target="_top">Frames</a></li>
            <li><a href="DatagramSocket.html" target="_top">No Frames</a></li>
        </ul>
    </div>
    <div>
        <ul class="subNavList">
            <li>Summary:&nbsp;</li>
            Nested&nbsp;&nbsp;&nbsp;Field&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<li><a href="#constructor_summary">Constructor</a></li>&nbsp;&nbsp;&nbsp;<li><a href="#method_summary">Method</a></li>&nbsp;&nbsp;&nbsp;
        </ul>
        <ul class="subNavList">
            <li>&nbsp;|&nbsp;Detail:&nbsp;</li>
            Field&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<li><a href="#constructor_detail">Constructor</a></li>&nbsp;&nbsp;&nbsp;<li><a href="#method_detail">Method</a></li>&nbsp;&nbsp;&nbsp;
        </ul>
    </div>
    <a name="skip-navbar_top">
        <!--   -->
    </a></div>
<!-- ========= END OF TOP NAVBAR ========= -->

<!-- ======== START OF CLASS DATA ======== -->
<div class="header">

    <div class="subTitle">Package: <strong>io.vertx.groovy.core.datagram</strong></div>

    <h2 title="[Groovy] Class DatagramSocket" class="title">[Groovy] Class DatagramSocket</h2>
</div>
<div class="contentContainer">
<ul class="inheritance">
<li><ul class="inheritance"></ul></li><li>io.vertx.groovy.core.datagram.DatagramSocket
</ul>
<div class="description">
    <ul class="blockList">
        <li class="blockList">

            <dl>
                <dt>All Implemented Interfaces and Traits:</dt>
                <dd><a href='../../../../../io/vertx/groovy/core/metrics/Measured.html'>Measured</a>, <a href='../../../../../io/vertx/groovy/core/streams/ReadStream.html'>ReadStream</a></dd>
            </dl>
            <!-- todo: direct known subclasses -->
            <hr>
            <br>
<pre>@groovy.transform.CompileStatic
class DatagramSocket
extends java.lang.Object

</pre>



    <p> A datagram socket can be used to send <a href='../../../../../io/vertx/groovy/core/datagram/DatagramPacket.html' title='DatagramPacket'>DatagramPacket</a>'s to remote datagram servers
 and receive <a href='../../../../../io/vertx/groovy/core/datagram/DatagramPacket.html' title='DatagramPacket'>DatagramPacket</a>s .
 <p>
 Usually you use a datagram socket to send UDP over the wire. UDP is connection-less which means you are not connected
 to the remote peer in a persistent way. Because of this you have to supply the address and port of the remote peer
 when sending data.
 <p>
 You can send data to ipv4 or ipv6 addresses, which also include multicast addresses.
 <p>
 Please consult the documentation for more information on datagram sockets.
</p>

          </li>
    </ul>
</div>

<div class="summary">
    <ul class="blockList">
        <li class="blockList">
        <!-- =========== NESTED CLASS SUMMARY =========== -->
        

        <!-- =========== ENUM CONSTANT SUMMARY =========== -->
        
        <!-- =========== FIELD SUMMARY =========== -->
        

        <!-- =========== PROPERTY SUMMARY =========== -->
        

        <!-- =========== ELEMENT SUMMARY =========== -->
        

        
        <!-- ======== CONSTRUCTOR SUMMARY ======== -->
        <ul class="blockList">
                <li class="blockList"><a name="constructor_summary"><!--   --></a>
                    <h3>Constructor Summary</h3>
                    <ul class="blockList">
                    <table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructors Summary table">
                        <caption><span>Constructors</span><span class="tabEnd">&nbsp;</span></caption>
                        <tr>
                            <th class="colFirst" scope="col">Constructor and description</th>
                        </tr>
                        
                        <tr class="altColor">
                            <td class="colFirst">
                                <code><a href="#DatagramSocket(java.lang.Object)">DatagramSocket</a></strong>
                                (java.lang.Object delegate)</code><br></td>
                        </tr>
                        
                    </table>
                   </ul>
              </li>
        </ul>
        

        
        <!-- ========== METHOD SUMMARY =========== -->
        <ul class="blockList">
            
            <li class="blockList"><a name="method_summary"><!--   --></a>
                    <h3>Methods Summary</h3>
                    <ul class="blockList">
                    <table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Methods Summary table">
                        <caption><span>Methods</span><span class="tabEnd">&nbsp;</span></caption>
                        <tr>
                            <th class="colFirst" scope="col">Type</th>
                            <th class="colLast" scope="col">Name and description</th>
                        </tr>
                        
                        <tr class="altColor">
                            <td class="colFirst"><code><a href='../../../../../io/vertx/groovy/core/datagram/DatagramSocket.html'>DatagramSocket</a></strong></code></td>
                            <td class="colLast"><code><strong><a href="#blockMulticastGroup(java.lang.String, java.lang.String, Handler<AsyncResult<DatagramSocket>>)">blockMulticastGroup</a></strong>(java.lang.String multicastAddress, java.lang.String sourceToBlock, io.vertx.core.Handler&lt;io.vertx.core.AsyncResult&lt;<a href='../../../../../io/vertx/groovy/core/datagram/DatagramSocket.html' title='DatagramSocket'>DatagramSocket</a>&gt;&gt; handler)</code><br>Block the given address for the given multicast address and notifies the  once
 the operation completes.</td>
                        </tr>
                        
                        <tr class="rowColor">
                            <td class="colFirst"><code><a href='../../../../../io/vertx/groovy/core/datagram/DatagramSocket.html'>DatagramSocket</a></strong></code></td>
                            <td class="colLast"><code><strong><a href="#blockMulticastGroup(java.lang.String, java.lang.String, java.lang.String, Handler<AsyncResult<DatagramSocket>>)">blockMulticastGroup</a></strong>(java.lang.String multicastAddress, java.lang.String networkInterface, java.lang.String sourceToBlock, io.vertx.core.Handler&lt;io.vertx.core.AsyncResult&lt;<a href='../../../../../io/vertx/groovy/core/datagram/DatagramSocket.html' title='DatagramSocket'>DatagramSocket</a>&gt;&gt; handler)</code><br>Block the given address for the given multicast address on the given network interface and notifies
 the  once the operation completes.</td>
                        </tr>
                        
                        <tr class="altColor">
                            <td class="colFirst"><code>void</strong></code></td>
                            <td class="colLast"><code><strong><a href="#close(Handler<AsyncResult<Void>>)">close</a></strong>(io.vertx.core.Handler&lt;io.vertx.core.AsyncResult&lt;java.lang.Void&gt;&gt; handler)</code><br>Closes the <a href='../../../../../io/vertx/groovy/core/datagram/DatagramSocket.html' title='DatagramSocket'>DatagramSocket</a> implementation asynchronous
 and notifies the handler once done.</td>
                        </tr>
                        
                        <tr class="rowColor">
                            <td class="colFirst"><code>void</strong></code></td>
                            <td class="colLast"><code><strong><a href="#close()">close</a></strong>()</code><br>Closes the <a href='../../../../../io/vertx/groovy/core/datagram/DatagramSocket.html' title='DatagramSocket'>DatagramSocket</a>. </td>
                        </tr>
                        
                        <tr class="altColor">
                            <td class="colFirst"><code><a href='../../../../../io/vertx/groovy/core/datagram/DatagramSocket.html'>DatagramSocket</a></strong></code></td>
                            <td class="colLast"><code><strong><a href="#endHandler(Handler<Void>)">endHandler</a></strong>(io.vertx.core.Handler&lt;java.lang.Void&gt; endHandler)</code><br></td>
                        </tr>
                        
                        <tr class="rowColor">
                            <td class="colFirst"><code><a href='../../../../../io/vertx/groovy/core/datagram/DatagramSocket.html'>DatagramSocket</a></strong></code></td>
                            <td class="colLast"><code><strong><a href="#exceptionHandler(Handler<Throwable>)">exceptionHandler</a></strong>(io.vertx.core.Handler&lt;java.lang.Throwable&gt; handler)</code><br></td>
                        </tr>
                        
                        <tr class="altColor">
                            <td class="colFirst"><code>java.lang.Object</strong></code></td>
                            <td class="colLast"><code><strong><a href="#getDelegate()">getDelegate</a></strong>()</code><br></td>
                        </tr>
                        
                        <tr class="rowColor">
                            <td class="colFirst"><code><a href='../../../../../io/vertx/groovy/core/datagram/DatagramSocket.html'>DatagramSocket</a></strong></code></td>
                            <td class="colLast"><code><strong><a href="#handler(Handler<DatagramPacket>)">handler</a></strong>(io.vertx.core.Handler&lt;<a href='../../../../../io/vertx/groovy/core/datagram/DatagramPacket.html' title='DatagramPacket'>DatagramPacket</a>&gt; handler)</code><br></td>
                        </tr>
                        
                        <tr class="altColor">
                            <td class="colFirst"><code>boolean</strong></code></td>
                            <td class="colLast"><code><strong><a href="#isMetricsEnabled()">isMetricsEnabled</a></strong>()</code><br>Whether the metrics are enabled for this measured object</td>
                        </tr>
                        
                        <tr class="rowColor">
                            <td class="colFirst"><code><a href='../../../../../io/vertx/groovy/core/datagram/DatagramSocket.html'>DatagramSocket</a></strong></code></td>
                            <td class="colLast"><code><strong><a href="#listen(int, java.lang.String, Handler<AsyncResult<DatagramSocket>>)">listen</a></strong>(int port, java.lang.String host, io.vertx.core.Handler&lt;io.vertx.core.AsyncResult&lt;<a href='../../../../../io/vertx/groovy/core/datagram/DatagramSocket.html' title='DatagramSocket'>DatagramSocket</a>&gt;&gt; handler)</code><br>Start listening on the given port and host. </td>
                        </tr>
                        
                        <tr class="altColor">
                            <td class="colFirst"><code><a href='../../../../../io/vertx/groovy/core/datagram/DatagramSocket.html'>DatagramSocket</a></strong></code></td>
                            <td class="colLast"><code><strong><a href="#listenMulticastGroup(java.lang.String, Handler<AsyncResult<DatagramSocket>>)">listenMulticastGroup</a></strong>(java.lang.String multicastAddress, io.vertx.core.Handler&lt;io.vertx.core.AsyncResult&lt;<a href='../../../../../io/vertx/groovy/core/datagram/DatagramSocket.html' title='DatagramSocket'>DatagramSocket</a>&gt;&gt; handler)</code><br>Joins a multicast group and listens for packets send to it.
 </td>
                        </tr>
                        
                        <tr class="rowColor">
                            <td class="colFirst"><code><a href='../../../../../io/vertx/groovy/core/datagram/DatagramSocket.html'>DatagramSocket</a></strong></code></td>
                            <td class="colLast"><code><strong><a href="#listenMulticastGroup(java.lang.String, java.lang.String, java.lang.String, Handler<AsyncResult<DatagramSocket>>)">listenMulticastGroup</a></strong>(java.lang.String multicastAddress, java.lang.String networkInterface, java.lang.String source, io.vertx.core.Handler&lt;io.vertx.core.AsyncResult&lt;<a href='../../../../../io/vertx/groovy/core/datagram/DatagramSocket.html' title='DatagramSocket'>DatagramSocket</a>&gt;&gt; handler)</code><br>Joins a multicast group and listens for packets send to it on the given network interface.
 </td>
                        </tr>
                        
                        <tr class="altColor">
                            <td class="colFirst"><code><a href='../../../../../io/vertx/groovy/core/net/SocketAddress.html'>SocketAddress</a></strong></code></td>
                            <td class="colLast"><code><strong><a href="#localAddress()">localAddress</a></strong>()</code><br>Return the <a href='../../../../../io/vertx/groovy/core/net/SocketAddress.html' title='SocketAddress'>SocketAddress</a> to which
 this <a href='../../../../../io/vertx/groovy/core/datagram/DatagramSocket.html' title='DatagramSocket'>DatagramSocket</a> is bound.</td>
                        </tr>
                        
                        <tr class="rowColor">
                            <td class="colFirst"><code><a href='../../../../../io/vertx/groovy/core/datagram/DatagramSocket.html'>DatagramSocket</a></strong></code></td>
                            <td class="colLast"><code><strong><a href="#pause()">pause</a></strong>()</code><br></td>
                        </tr>
                        
                        <tr class="altColor">
                            <td class="colFirst"><code><a href='../../../../../io/vertx/groovy/core/datagram/DatagramSocket.html'>DatagramSocket</a></strong></code></td>
                            <td class="colLast"><code><strong><a href="#resume()">resume</a></strong>()</code><br></td>
                        </tr>
                        
                        <tr class="rowColor">
                            <td class="colFirst"><code><a href='../../../../../io/vertx/groovy/core/datagram/DatagramSocket.html'>DatagramSocket</a></strong></code></td>
                            <td class="colLast"><code><strong><a href="#send(io.vertx.groovy.core.buffer.Buffer, int, java.lang.String, Handler<AsyncResult<DatagramSocket>>)">send</a></strong>(<a href='../../../../../io/vertx/groovy/core/buffer/Buffer.html'>Buffer</a> packet, int port, java.lang.String host, io.vertx.core.Handler&lt;io.vertx.core.AsyncResult&lt;<a href='../../../../../io/vertx/groovy/core/datagram/DatagramSocket.html' title='DatagramSocket'>DatagramSocket</a>&gt;&gt; handler)</code><br>Write the given <a href='../../../../../io/vertx/groovy/core/buffer/Buffer.html' title='Buffer'>Buffer</a> to the <a href='../../../../../io/vertx/groovy/core/net/SocketAddress.html' title='SocketAddress'>SocketAddress</a>.
 </td>
                        </tr>
                        
                        <tr class="altColor">
                            <td class="colFirst"><code><a href='../../../../../io/vertx/groovy/core/datagram/DatagramSocket.html'>DatagramSocket</a></strong></code></td>
                            <td class="colLast"><code><strong><a href="#send(java.lang.String, int, java.lang.String, Handler<AsyncResult<DatagramSocket>>)">send</a></strong>(java.lang.String str, int port, java.lang.String host, io.vertx.core.Handler&lt;io.vertx.core.AsyncResult&lt;<a href='../../../../../io/vertx/groovy/core/datagram/DatagramSocket.html' title='DatagramSocket'>DatagramSocket</a>&gt;&gt; handler)</code><br>Write the given java.lang.String to the <a href='../../../../../io/vertx/groovy/core/net/SocketAddress.html' title='SocketAddress'>SocketAddress</a> using UTF8 encoding.
 </td>
                        </tr>
                        
                        <tr class="rowColor">
                            <td class="colFirst"><code><a href='../../../../../io/vertx/groovy/core/datagram/DatagramSocket.html'>DatagramSocket</a></strong></code></td>
                            <td class="colLast"><code><strong><a href="#send(java.lang.String, java.lang.String, int, java.lang.String, Handler<AsyncResult<DatagramSocket>>)">send</a></strong>(java.lang.String str, java.lang.String enc, int port, java.lang.String host, io.vertx.core.Handler&lt;io.vertx.core.AsyncResult&lt;<a href='../../../../../io/vertx/groovy/core/datagram/DatagramSocket.html' title='DatagramSocket'>DatagramSocket</a>&gt;&gt; handler)</code><br>Write the given java.lang.String to the <a href='../../../../../io/vertx/groovy/core/net/SocketAddress.html' title='SocketAddress'>SocketAddress</a> using the given encoding.
 </td>
                        </tr>
                        
                        <tr class="altColor">
                            <td class="colFirst"><code><a href='../../../../../io/vertx/groovy/core/datagram/PacketWritestream.html'>PacketWritestream</a></strong></code></td>
                            <td class="colLast"><code><strong><a href="#sender(int, java.lang.String)">sender</a></strong>(int port, java.lang.String host)</code><br>Returns a <a href='../../../../../io/vertx/groovy/core/datagram/PacketWritestream.html' title='PacketWritestream'>PacketWritestream</a> able to send  to the
 <a href='../../../../../io/vertx/groovy/core/net/SocketAddress.html' title='SocketAddress'>SocketAddress</a>.</td>
                        </tr>
                        
                        <tr class="rowColor">
                            <td class="colFirst"><code><a href='../../../../../io/vertx/groovy/core/datagram/DatagramSocket.html'>DatagramSocket</a></strong></code></td>
                            <td class="colLast"><code><strong><a href="#unlistenMulticastGroup(java.lang.String, Handler<AsyncResult<DatagramSocket>>)">unlistenMulticastGroup</a></strong>(java.lang.String multicastAddress, io.vertx.core.Handler&lt;io.vertx.core.AsyncResult&lt;<a href='../../../../../io/vertx/groovy/core/datagram/DatagramSocket.html' title='DatagramSocket'>DatagramSocket</a>&gt;&gt; handler)</code><br>Leaves a multicast group and stops listening for packets send to it.
 </td>
                        </tr>
                        
                        <tr class="altColor">
                            <td class="colFirst"><code><a href='../../../../../io/vertx/groovy/core/datagram/DatagramSocket.html'>DatagramSocket</a></strong></code></td>
                            <td class="colLast"><code><strong><a href="#unlistenMulticastGroup(java.lang.String, java.lang.String, java.lang.String, Handler<AsyncResult<DatagramSocket>>)">unlistenMulticastGroup</a></strong>(java.lang.String multicastAddress, java.lang.String networkInterface, java.lang.String source, io.vertx.core.Handler&lt;io.vertx.core.AsyncResult&lt;<a href='../../../../../io/vertx/groovy/core/datagram/DatagramSocket.html' title='DatagramSocket'>DatagramSocket</a>&gt;&gt; handler)</code><br>Leaves a multicast group and stops listening for packets send to it on the given network interface.
 </td>
                        </tr>
                        
                    </table>
                   </ul>
              </li>
            
            <li class="blockList"><a name="method_summary"><!--   --></a>
                    <h3>Inherited Methods Summary</h3>
                    <ul class="blockList">
                    <table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Inherited Methods Summary table">
                        <caption><span>Inherited Methods</span><span class="tabEnd">&nbsp;</span></caption>
                        <tr>
                            <th class="colFirst" scope="col">Methods inherited from class</th>
                            <th class="colLast" scope="col">Name</th>
                        </tr>
                        
                        <tr class="altColor">
                            <td class="colFirst"><code>class java.lang.Object</strong></code></td>
                            <td class="colLast"><code>java.lang.Object#wait(long, int), java.lang.Object#wait(long), java.lang.Object#wait(), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll()</code></td>
                        </tr>
                    </table>
                   </ul>
              </li>
                
        </ul>
        
    </li>
    </ul>
</div>

<div class="details">
    <ul class="blockList">
        <li class="blockList">
           

            

            

            

            
            <!-- =========== CONSTRUCTOR DETAIL =========== -->
            <ul class="blockList">
                <li class="blockList"><a name="constructor_detail">
                    <!--   -->
                </a>
                    <h3>Constructor Detail</h3>
                    
                        <a name="DatagramSocket(java.lang.Object)"><!-- --></a>
                        <ul class="blockListLast">
                            <li class="blockList">
                                <h4><strong>DatagramSocket</strong>(java.lang.Object delegate)</h4>
                                <p></p>
                            </li>
                        </ul>
                    
                </li>
            </ul>
            


            
            <!-- =========== METHOD DETAIL =========== -->
            <ul class="blockList">
                <li class="blockList"><a name="method_detail">
                    <!--   -->
                </a>
                    <h3>Method Detail</h3>
                    
                        <a name="blockMulticastGroup(java.lang.String, java.lang.String, Handler<AsyncResult<DatagramSocket>>)"><!-- --></a>
                        <ul class="blockListLast">
                            <li class="blockList">
                                <h4><a href='../../../../../io/vertx/groovy/core/datagram/DatagramSocket.html'>DatagramSocket</a> <strong>blockMulticastGroup</strong>(java.lang.String multicastAddress, java.lang.String sourceToBlock, io.vertx.core.Handler&lt;io.vertx.core.AsyncResult&lt;<a href='../../../../../io/vertx/groovy/core/datagram/DatagramSocket.html' title='DatagramSocket'>DatagramSocket</a>&gt;&gt; handler)</h4>
                                <p> Block the given address for the given multicast address and notifies the  once
 the operation completes.
   <DL><DT><B>Returns:</B></DT><DD>a reference to this, so the API can be used fluently</DD></DL><DL><DT><B>Parameters:</B></DT><DD><code>multicastAddress</code> -  the address for which you want to block the source address</DD><DD><code>sourceToBlock</code> -  the source address which should be blocked. You will not receive an multicast packets for it anymore.</DD><DD><code>handler</code> -  the handler to notify once the operation completes</DD></DL></p>
                            </li>
                        </ul>
                    
                        <a name="blockMulticastGroup(java.lang.String, java.lang.String, java.lang.String, Handler<AsyncResult<DatagramSocket>>)"><!-- --></a>
                        <ul class="blockListLast">
                            <li class="blockList">
                                <h4><a href='../../../../../io/vertx/groovy/core/datagram/DatagramSocket.html'>DatagramSocket</a> <strong>blockMulticastGroup</strong>(java.lang.String multicastAddress, java.lang.String networkInterface, java.lang.String sourceToBlock, io.vertx.core.Handler&lt;io.vertx.core.AsyncResult&lt;<a href='../../../../../io/vertx/groovy/core/datagram/DatagramSocket.html' title='DatagramSocket'>DatagramSocket</a>&gt;&gt; handler)</h4>
                                <p> Block the given address for the given multicast address on the given network interface and notifies
 the  once the operation completes.
   <DL><DT><B>Returns:</B></DT><DD>a reference to this, so the API can be used fluently</DD></DL><DL><DT><B>Parameters:</B></DT><DD><code>multicastAddress</code> -  the address for which you want to block the source address</DD><DD><code>networkInterface</code> -  the network interface on which the blocking should occur.</DD><DD><code>sourceToBlock</code> -  the source address which should be blocked. You will not receive an multicast packets for it anymore.</DD><DD><code>handler</code> -  the handler to notify once the operation completes</DD></DL></p>
                            </li>
                        </ul>
                    
                        <a name="close(Handler<AsyncResult<Void>>)"><!-- --></a>
                        <ul class="blockListLast">
                            <li class="blockList">
                                <h4>void <strong>close</strong>(io.vertx.core.Handler&lt;io.vertx.core.AsyncResult&lt;java.lang.Void&gt;&gt; handler)</h4>
                                <p> Closes the <a href='../../../../../io/vertx/groovy/core/datagram/DatagramSocket.html' title='DatagramSocket'>DatagramSocket</a> implementation asynchronous
 and notifies the handler once done.
   <DL><DT><B>Parameters:</B></DT><DD><code>handler</code> -  the handler to notify once complete</DD></DL></p>
                            </li>
                        </ul>
                    
                        <a name="close()"><!-- --></a>
                        <ul class="blockListLast">
                            <li class="blockList">
                                <h4>void <strong>close</strong>()</h4>
                                <p> Closes the <a href='../../../../../io/vertx/groovy/core/datagram/DatagramSocket.html' title='DatagramSocket'>DatagramSocket</a>. The close itself is asynchronous.
   </p>
                            </li>
                        </ul>
                    
                        <a name="endHandler(Handler<Void>)"><!-- --></a>
                        <ul class="blockListLast">
                            <li class="blockList">
                                <h4><a href='../../../../../io/vertx/groovy/core/datagram/DatagramSocket.html'>DatagramSocket</a> <strong>endHandler</strong>(io.vertx.core.Handler&lt;java.lang.Void&gt; endHandler)</h4>
                                <p></p>
                            </li>
                        </ul>
                    
                        <a name="exceptionHandler(Handler<Throwable>)"><!-- --></a>
                        <ul class="blockListLast">
                            <li class="blockList">
                                <h4><a href='../../../../../io/vertx/groovy/core/datagram/DatagramSocket.html'>DatagramSocket</a> <strong>exceptionHandler</strong>(io.vertx.core.Handler&lt;java.lang.Throwable&gt; handler)</h4>
                                <p></p>
                            </li>
                        </ul>
                    
                        <a name="getDelegate()"><!-- --></a>
                        <ul class="blockListLast">
                            <li class="blockList">
                                <h4>java.lang.Object <strong>getDelegate</strong>()</h4>
                                <p></p>
                            </li>
                        </ul>
                    
                        <a name="handler(Handler<DatagramPacket>)"><!-- --></a>
                        <ul class="blockListLast">
                            <li class="blockList">
                                <h4><a href='../../../../../io/vertx/groovy/core/datagram/DatagramSocket.html'>DatagramSocket</a> <strong>handler</strong>(io.vertx.core.Handler&lt;<a href='../../../../../io/vertx/groovy/core/datagram/DatagramPacket.html' title='DatagramPacket'>DatagramPacket</a>&gt; handler)</h4>
                                <p></p>
                            </li>
                        </ul>
                    
                        <a name="isMetricsEnabled()"><!-- --></a>
                        <ul class="blockListLast">
                            <li class="blockList">
                                <h4>boolean <strong>isMetricsEnabled</strong>()</h4>
                                <p> Whether the metrics are enabled for this measured object
   <DL><DT><B>Returns:</B></DT><DD>true if the metrics are enabled</DD></DL></p>
                            </li>
                        </ul>
                    
                        <a name="listen(int, java.lang.String, Handler<AsyncResult<DatagramSocket>>)"><!-- --></a>
                        <ul class="blockListLast">
                            <li class="blockList">
                                <h4><a href='../../../../../io/vertx/groovy/core/datagram/DatagramSocket.html'>DatagramSocket</a> <strong>listen</strong>(int port, java.lang.String host, io.vertx.core.Handler&lt;io.vertx.core.AsyncResult&lt;<a href='../../../../../io/vertx/groovy/core/datagram/DatagramSocket.html' title='DatagramSocket'>DatagramSocket</a>&gt;&gt; handler)</h4>
                                <p> Start listening on the given port and host. The handler will be called when the socket is listening.
   <DL><DT><B>Returns:</B></DT><DD>a reference to this, so the API can be used fluently</DD></DL><DL><DT><B>Parameters:</B></DT><DD><code>port</code> -  the port to listen on</DD><DD><code>host</code> -  the host to listen on</DD><DD><code>handler</code> -  the handler will be called when listening</DD></DL></p>
                            </li>
                        </ul>
                    
                        <a name="listenMulticastGroup(java.lang.String, Handler<AsyncResult<DatagramSocket>>)"><!-- --></a>
                        <ul class="blockListLast">
                            <li class="blockList">
                                <h4><a href='../../../../../io/vertx/groovy/core/datagram/DatagramSocket.html'>DatagramSocket</a> <strong>listenMulticastGroup</strong>(java.lang.String multicastAddress, io.vertx.core.Handler&lt;io.vertx.core.AsyncResult&lt;<a href='../../../../../io/vertx/groovy/core/datagram/DatagramSocket.html' title='DatagramSocket'>DatagramSocket</a>&gt;&gt; handler)</h4>
                                <p> Joins a multicast group and listens for packets send to it.
 The  is notified once the operation completes.
   <DL><DT><B>Returns:</B></DT><DD>a reference to this, so the API can be used fluently</DD></DL><DL><DT><B>Parameters:</B></DT><DD><code>multicastAddress</code> -  the address of the multicast group to join</DD><DD><code>handler</code> -  then handler to notify once the operation completes</DD></DL></p>
                            </li>
                        </ul>
                    
                        <a name="listenMulticastGroup(java.lang.String, java.lang.String, java.lang.String, Handler<AsyncResult<DatagramSocket>>)"><!-- --></a>
                        <ul class="blockListLast">
                            <li class="blockList">
                                <h4><a href='../../../../../io/vertx/groovy/core/datagram/DatagramSocket.html'>DatagramSocket</a> <strong>listenMulticastGroup</strong>(java.lang.String multicastAddress, java.lang.String networkInterface, java.lang.String source, io.vertx.core.Handler&lt;io.vertx.core.AsyncResult&lt;<a href='../../../../../io/vertx/groovy/core/datagram/DatagramSocket.html' title='DatagramSocket'>DatagramSocket</a>&gt;&gt; handler)</h4>
                                <p> Joins a multicast group and listens for packets send to it on the given network interface.
 The  is notified once the operation completes.
   <DL><DT><B>Returns:</B></DT><DD>a reference to this, so the API can be used fluently</DD></DL><DL><DT><B>Parameters:</B></DT><DD><code>multicastAddress</code> -  the address of the multicast group to join</DD><DD><code>networkInterface</code> -  the network interface on which to listen for packets.</DD><DD><code>source</code> -  the address of the source for which we will listen for multicast packets</DD><DD><code>handler</code> -  then handler to notify once the operation completes</DD></DL></p>
                            </li>
                        </ul>
                    
                        <a name="localAddress()"><!-- --></a>
                        <ul class="blockListLast">
                            <li class="blockList">
                                <h4><a href='../../../../../io/vertx/groovy/core/net/SocketAddress.html'>SocketAddress</a> <strong>localAddress</strong>()</h4>
                                <p> Return the <a href='../../../../../io/vertx/groovy/core/net/SocketAddress.html' title='SocketAddress'>SocketAddress</a> to which
 this <a href='../../../../../io/vertx/groovy/core/datagram/DatagramSocket.html' title='DatagramSocket'>DatagramSocket</a> is bound.
   <DL><DT><B>Returns:</B></DT><DD>the socket address</DD></DL></p>
                            </li>
                        </ul>
                    
                        <a name="pause()"><!-- --></a>
                        <ul class="blockListLast">
                            <li class="blockList">
                                <h4><a href='../../../../../io/vertx/groovy/core/datagram/DatagramSocket.html'>DatagramSocket</a> <strong>pause</strong>()</h4>
                                <p></p>
                            </li>
                        </ul>
                    
                        <a name="resume()"><!-- --></a>
                        <ul class="blockListLast">
                            <li class="blockList">
                                <h4><a href='../../../../../io/vertx/groovy/core/datagram/DatagramSocket.html'>DatagramSocket</a> <strong>resume</strong>()</h4>
                                <p></p>
                            </li>
                        </ul>
                    
                        <a name="send(io.vertx.groovy.core.buffer.Buffer, int, java.lang.String, Handler<AsyncResult<DatagramSocket>>)"><!-- --></a>
                        <ul class="blockListLast">
                            <li class="blockList">
                                <h4><a href='../../../../../io/vertx/groovy/core/datagram/DatagramSocket.html'>DatagramSocket</a> <strong>send</strong>(<a href='../../../../../io/vertx/groovy/core/buffer/Buffer.html'>Buffer</a> packet, int port, java.lang.String host, io.vertx.core.Handler&lt;io.vertx.core.AsyncResult&lt;<a href='../../../../../io/vertx/groovy/core/datagram/DatagramSocket.html' title='DatagramSocket'>DatagramSocket</a>&gt;&gt; handler)</h4>
                                <p> Write the given <a href='../../../../../io/vertx/groovy/core/buffer/Buffer.html' title='Buffer'>Buffer</a> to the <a href='../../../../../io/vertx/groovy/core/net/SocketAddress.html' title='SocketAddress'>SocketAddress</a>.
 The io.vertx.groovy.core.Handler will be notified once the write completes.
   <DL><DT><B>Returns:</B></DT><DD>a reference to this, so the API can be used fluently</DD></DL><DL><DT><B>Parameters:</B></DT><DD><code>packet</code> -  the <a href='../../../../../io/vertx/groovy/core/buffer/Buffer.html' title='Buffer'>Buffer</a> to write</DD><DD><code>port</code> -  the host port of the remote peer</DD><DD><code>host</code> -  the host address of the remote peer</DD><DD><code>handler</code> -  the io.vertx.groovy.core.Handler to notify once the write completes.</DD></DL></p>
                            </li>
                        </ul>
                    
                        <a name="send(java.lang.String, int, java.lang.String, Handler<AsyncResult<DatagramSocket>>)"><!-- --></a>
                        <ul class="blockListLast">
                            <li class="blockList">
                                <h4><a href='../../../../../io/vertx/groovy/core/datagram/DatagramSocket.html'>DatagramSocket</a> <strong>send</strong>(java.lang.String str, int port, java.lang.String host, io.vertx.core.Handler&lt;io.vertx.core.AsyncResult&lt;<a href='../../../../../io/vertx/groovy/core/datagram/DatagramSocket.html' title='DatagramSocket'>DatagramSocket</a>&gt;&gt; handler)</h4>
                                <p> Write the given java.lang.String to the <a href='../../../../../io/vertx/groovy/core/net/SocketAddress.html' title='SocketAddress'>SocketAddress</a> using UTF8 encoding.
 The  will be notified once the write completes.
   <DL><DT><B>Returns:</B></DT><DD>a reference to this, so the API can be used fluently</DD></DL><DL><DT><B>Parameters:</B></DT><DD><code>str</code> -  the java.lang.String to write</DD><DD><code>port</code> -  the host port of the remote peer</DD><DD><code>host</code> -  the host address of the remote peer</DD><DD><code>handler</code> -  the io.vertx.groovy.core.Handler to notify once the write completes.</DD></DL></p>
                            </li>
                        </ul>
                    
                        <a name="send(java.lang.String, java.lang.String, int, java.lang.String, Handler<AsyncResult<DatagramSocket>>)"><!-- --></a>
                        <ul class="blockListLast">
                            <li class="blockList">
                                <h4><a href='../../../../../io/vertx/groovy/core/datagram/DatagramSocket.html'>DatagramSocket</a> <strong>send</strong>(java.lang.String str, java.lang.String enc, int port, java.lang.String host, io.vertx.core.Handler&lt;io.vertx.core.AsyncResult&lt;<a href='../../../../../io/vertx/groovy/core/datagram/DatagramSocket.html' title='DatagramSocket'>DatagramSocket</a>&gt;&gt; handler)</h4>
                                <p> Write the given java.lang.String to the <a href='../../../../../io/vertx/groovy/core/net/SocketAddress.html' title='SocketAddress'>SocketAddress</a> using the given encoding.
 The  will be notified once the write completes.
   <DL><DT><B>Returns:</B></DT><DD>a reference to this, so the API can be used fluently</DD></DL><DL><DT><B>Parameters:</B></DT><DD><code>str</code> -  the java.lang.String to write</DD><DD><code>enc</code> -  the charset used for encoding</DD><DD><code>port</code> -  the host port of the remote peer</DD><DD><code>host</code> -  the host address of the remote peer</DD><DD><code>handler</code> -  the io.vertx.groovy.core.Handler to notify once the write completes.</DD></DL></p>
                            </li>
                        </ul>
                    
                        <a name="sender(int, java.lang.String)"><!-- --></a>
                        <ul class="blockListLast">
                            <li class="blockList">
                                <h4><a href='../../../../../io/vertx/groovy/core/datagram/PacketWritestream.html'>PacketWritestream</a> <strong>sender</strong>(int port, java.lang.String host)</h4>
                                <p> Returns a <a href='../../../../../io/vertx/groovy/core/datagram/PacketWritestream.html' title='PacketWritestream'>PacketWritestream</a> able to send  to the
 <a href='../../../../../io/vertx/groovy/core/net/SocketAddress.html' title='SocketAddress'>SocketAddress</a>.
   <DL><DT><B>Returns:</B></DT><DD>the write stream for sending packets</DD></DL><DL><DT><B>Parameters:</B></DT><DD><code>port</code> -  the port of the remote peer</DD><DD><code>host</code> -  the host address of the remote peer</DD></DL></p>
                            </li>
                        </ul>
                    
                        <a name="unlistenMulticastGroup(java.lang.String, Handler<AsyncResult<DatagramSocket>>)"><!-- --></a>
                        <ul class="blockListLast">
                            <li class="blockList">
                                <h4><a href='../../../../../io/vertx/groovy/core/datagram/DatagramSocket.html'>DatagramSocket</a> <strong>unlistenMulticastGroup</strong>(java.lang.String multicastAddress, io.vertx.core.Handler&lt;io.vertx.core.AsyncResult&lt;<a href='../../../../../io/vertx/groovy/core/datagram/DatagramSocket.html' title='DatagramSocket'>DatagramSocket</a>&gt;&gt; handler)</h4>
                                <p> Leaves a multicast group and stops listening for packets send to it.
 The  is notified once the operation completes.
   <DL><DT><B>Returns:</B></DT><DD>a reference to this, so the API can be used fluently</DD></DL><DL><DT><B>Parameters:</B></DT><DD><code>multicastAddress</code> -  the address of the multicast group to leave</DD><DD><code>handler</code> -  then handler to notify once the operation completes</DD></DL></p>
                            </li>
                        </ul>
                    
                        <a name="unlistenMulticastGroup(java.lang.String, java.lang.String, java.lang.String, Handler<AsyncResult<DatagramSocket>>)"><!-- --></a>
                        <ul class="blockListLast">
                            <li class="blockList">
                                <h4><a href='../../../../../io/vertx/groovy/core/datagram/DatagramSocket.html'>DatagramSocket</a> <strong>unlistenMulticastGroup</strong>(java.lang.String multicastAddress, java.lang.String networkInterface, java.lang.String source, io.vertx.core.Handler&lt;io.vertx.core.AsyncResult&lt;<a href='../../../../../io/vertx/groovy/core/datagram/DatagramSocket.html' title='DatagramSocket'>DatagramSocket</a>&gt;&gt; handler)</h4>
                                <p> Leaves a multicast group and stops listening for packets send to it on the given network interface.
 The  is notified once the operation completes.
   <DL><DT><B>Returns:</B></DT><DD>a reference to this, so the API can be used fluently</DD></DL><DL><DT><B>Parameters:</B></DT><DD><code>multicastAddress</code> -  the address of the multicast group to join</DD><DD><code>networkInterface</code> -  the network interface on which to listen for packets.</DD><DD><code>source</code> -  the address of the source for which we will listen for multicast packets</DD><DD><code>handler</code> -  the handler to notify once the operation completes</DD></DL></p>
                            </li>
                        </ul>
                    
                </li>
            </ul>
            
        </li>
    </ul>
</div>

<!-- ========= END OF CLASS DATA ========= -->
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<div class="bottomNav"><a name="navbar_bottom">
    <!--   -->
</a><a href="#skip-navbar_bottom" title="Skip navigation links"></a><a name="navbar_bottom_firstrow">
    <!--   -->
</a>
    <ul class="navList" title="Navigation">
        <li><a href="../../../../../overview-summary.html">Overview</a></li>
        <li><a href="package-summary.html">Package</a></li>
        <li class="navBarCell1Rev">Class</li>
        <li><a href="../../../../../deprecated-list.html">Deprecated</a></li>
        <li><a href="../../../../../index-all.html">Index</a></li>
        <li><a href="../../../../../help-doc.html">Help</a></li>
    </ul>
</div>

<div class="subNav">
    <div>
        <ul class="navList">
            <li><a href="../../../../../index.html?io/vertx/groovy/core/datagram/DatagramSocket" target="_top">Frames</a></li>
            <li><a href="DatagramSocket.html" target="_top">No Frames</a></li>
        </ul>
    </div>
    <div>
        <ul class="subNavList">
            <li>Summary:&nbsp;</li>
            Nested&nbsp;&nbsp;&nbsp;Field&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<li><a href="#constructor_summary">Constructor</a></li>&nbsp;&nbsp;&nbsp;<li><a href="#method_summary">Method</a></li>&nbsp;&nbsp;&nbsp;
        </ul>
        <ul class="subNavList">
            <li>&nbsp;|&nbsp;Detail:&nbsp;</li>
            Field&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<li><a href="#constructor_detail">Constructor</a></li>&nbsp;&nbsp;&nbsp;<li><a href="#method_detail">Method</a></li>&nbsp;&nbsp;&nbsp;
        </ul>
    </div>
    <p>Groovy Documentation</p>
    <a name="skip-navbar_bottom">
        <!--   -->
    </a>
    </div>
</div>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
</body>
</html>